{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "INFO: Recompiling stale cache file /home/dzea/.julia/lib/v0.5/PairwiseListMatrices.ji for module PairwiseListMatrices.\n",
      "WARNING: Method definition require(Symbol) in module Base at loading.jl:345 overwritten in module Main at /home/dzea/.julia/v0.5/Requires/src/require.jl:12.\n"
     ]
    }
   ],
   "source": [
    "using PairwiseListMatrices\n",
    "using BenchmarkTools\n",
    "using Base.Test"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "PLM = PairwiseListMatrix{Float64,false,Vector{Float64}}[ ones(PairwiseListMatrix(collect(1.:(100*99*0.5)))) for i in 1:100 ];"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {
    "collapsed": false
   },
   "outputs": [],
   "source": [
    "MAT = ones(Float64, 100, 100, 100);"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Test Passed\n",
       "  Expression: all(std(MAT,3) .== std(PLM))"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@test all(std(MAT, 3) .== std(PLM))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BenchmarkTools.Trial: \n",
       "  memory estimate:  157.33 kb\n",
       "  allocs estimate:  21\n",
       "  --------------\n",
       "  minimum time:     1.057 ms (0.00% GC)\n",
       "  median time:      1.135 ms (0.00% GC)\n",
       "  mean time:        1.146 ms (0.31% GC)\n",
       "  maximum time:     2.603 ms (0.00% GC)\n",
       "  --------------\n",
       "  samples:          4356\n",
       "  evals/sample:     1\n",
       "  time tolerance:   5.00%\n",
       "  memory tolerance: 1.00%"
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@benchmark std(MAT,3)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {
    "collapsed": false
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "BenchmarkTools.Trial: \n",
       "  memory estimate:  237.06 kb\n",
       "  allocs estimate:  22\n",
       "  --------------\n",
       "  minimum time:     528.528 μs (0.00% GC)\n",
       "  median time:      545.675 μs (0.00% GC)\n",
       "  mean time:        561.644 μs (0.96% GC)\n",
       "  maximum time:     1.356 ms (0.00% GC)\n",
       "  --------------\n",
       "  samples:          8889\n",
       "  evals/sample:     1\n",
       "  time tolerance:   5.00%\n",
       "  memory tolerance: 1.00%"
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "@benchmark std(PLM)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Julia 0.5.0",
   "language": "julia",
   "name": "julia-0.5"
  },
  "language_info": {
   "file_extension": ".jl",
   "mimetype": "application/julia",
   "name": "julia",
   "version": "0.5.0"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 0
}
